package com.jo.advisor;

import com.jo.proxy.AopProxy;
import com.jo.proxy.JdkAopProxy;

/**
 * 代理工厂用于根据AdvisedSupport生成代理类
 * @author Jo
 * @date 2018/1/26
 */
public class ProxyFactory {

    public static Object createProxy(AdvisedSupport config){
        return createAopProxy(config).getProxy();
    }

    private static AopProxy createAopProxy(AdvisedSupport config) {
        // TODO: 2018/1/26 cglib判断
        return new JdkAopProxy(config);
    }
}
